package com.sg.dto.biz.app.common;

import com.sg.common.dto.BaseDto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Objects;

/**
 * @desc EvaObjTargetCycleOsetDto
 * @使用场景
 */
@Data
public class EvaObjTargetCycleOsetDto extends BaseDto implements Serializable {

    /**
     * 被评对象目标设置ID
     */
    @ApiModelProperty("被评对象目标设置ID")
    private String evaObjOsetId;

    /**
     * 目标值
     */
    @ApiModelProperty("目标值")
    private Double targetValue;

    /**
     * 诊断值
     */
    @ApiModelProperty("诊断值")
    private Double targetDiagnosticValue;
    /**
     * 评价模板评价对象目标周期ID
     */
    @ApiModelProperty("评价模板评价对象目标周期ID")
    private String evaObjTargetCycleId;

    /**
     * 起始值
     */
    @NotNull(message = "起始值不能为空")
    @ApiModelProperty("起始值")
    private Double targetStartValue;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        if (!super.equals(o)) return false;
        EvaObjTargetCycleOsetDto that = (EvaObjTargetCycleOsetDto) o;
        return evaObjOsetId == that.evaObjOsetId && targetValue == that.targetValue && targetDiagnosticValue == that.targetDiagnosticValue && evaObjTargetCycleId == that.evaObjTargetCycleId && targetStartValue == that.targetStartValue;
    }

    @Override
    public int hashCode() {
        return Objects.hash(super.hashCode(), evaObjOsetId, targetValue, targetDiagnosticValue, evaObjTargetCycleId, targetStartValue);
    }

}
